
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package rad.Java.MotelPlus.Class;

//~--- non-JDK imports --------------------------------------------------------

import rad.Java.Common.Class.DefaultClass;
import rad.Java.Common.Class.IClass;

//~--- JDK imports ------------------------------------------------------------

import java.sql.ResultSet;
import java.sql.SQLException;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author rogerio
 */
public class Floor extends DefaultClass implements IClass {
    // <editor-fold defaultstate="collapsed" desc="comment">
    private String _apts_number;
    private String _block_id;
    // </editor-fold>

    public Floor()
    {
        _gsql.setTable("floor");
        _sequence = "floor_floor_id_seq";

        clear();
    }

    // <editor-fold defaultstate="collapsed" desc="comment">
    public String getAptsNumber() {
        return _apts_number;
    }

    public void setAptsNumber(String _apts_number) {
        this._apts_number = _apts_number;
    }

    public String getBlockId() {
        return _block_id;
    }

    public void setBlockId(String _block_id) {
        this._block_id = _block_id;
    }
    // </editor-fold>


    // <editor-fold defaultstate="collapsed" desc="comment">
    public void clear() {
        _id          = "";
        _apts_number = "";
        _block_id    = "";
    }

    @Override
    public void get(ResultSet rs) {
        try {
            _id          = rs.getString("floor_id");
            _apts_number = rs.getString("floor_apts_number");
            _block_id    = rs.getString("floor_block_id");
        } catch (SQLException ex) {
            Logger.getLogger(Floor.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    @Override
    public void setGsql() {
        _gsql.setValue(_id, "floor_id");
        _gsql.setValue(_apts_number, "floor_apts_number");
        _gsql.setValue(_block_id, "floor_block_id");
    }
    // </editor-fold>
}


//~ Formatted by Jindent --- http://www.jindent.com
